﻿<phone:PhoneApplicationPage
    x:Class="KursnaListaPhoneApp.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait"  Orientation="Portrait"
    shell:SystemTray.IsVisible="True">

    <toolkit:TransitionService.NavigationInTransition>
        <toolkit:NavigationInTransition>
            <toolkit:NavigationInTransition.Backward>
                <toolkit:TurnstileTransition Mode="BackwardIn"/>
            </toolkit:NavigationInTransition.Backward>
            <toolkit:NavigationInTransition.Forward>
                <toolkit:TurnstileTransition Mode="ForwardIn"/>
            </toolkit:NavigationInTransition.Forward>
        </toolkit:NavigationInTransition>
    </toolkit:TransitionService.NavigationInTransition>
    <toolkit:TransitionService.NavigationOutTransition>
        <toolkit:NavigationOutTransition>
            <toolkit:NavigationOutTransition.Backward>
                <toolkit:TurnstileTransition Mode="BackwardOut"/>
            </toolkit:NavigationOutTransition.Backward>
            <toolkit:NavigationOutTransition.Forward>
                <toolkit:TurnstileTransition Mode="ForwardOut"/>
            </toolkit:NavigationOutTransition.Forward>
        </toolkit:NavigationOutTransition>
    </toolkit:TransitionService.NavigationOutTransition>

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">

        <!-- LOCALIZATION NOTE:
            To localize the displayed strings copy their values to appropriately named
            keys in the app's neutral language resource file (AppResources.resx) then
            replace the hard-coded text value between the attributes' quotation marks
            with the binding clause whose path points to that string name.

            For example:

                Text="{Binding Path=LocalizedResources.ApplicationTitle, Source={StaticResource LocalizedStrings}}"

            This binding points to the template's string resource named "ApplicationTitle".

            Adding supported languages in the Project Properties tab will create a
            new resx file per language that can carry the translated values of your
            UI strings. The binding in these examples will cause the value of the
            attributes to be drawn from the .resx file that matches the
            CurrentUICulture of the app at run time.
         -->
        <!--Pivot Control-->
        <phone:Pivot Title="{Binding Path=LocalizedResources.ApplicationTitle, Source={StaticResource LocalizedStrings}}">
            <!--Pivot item za devize-->
            <phone:PivotItem Header="{Binding Path=LocalizedResources.ZaDevizePivotItemText, Source={StaticResource LocalizedStrings}}">
                <Grid Grid.Row="1" Margin="0,0,-12,0">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="60"></RowDefinition>
                        <RowDefinition Height="*"></RowDefinition>
                    </Grid.RowDefinitions>
                    <Grid Grid.Row="0">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="51"></ColumnDefinition>
                            <ColumnDefinition Width="150"></ColumnDefinition>
                            <ColumnDefinition Width="90"></ColumnDefinition>
                            <ColumnDefinition Width="0"></ColumnDefinition>
                            <ColumnDefinition Width="84"></ColumnDefinition>
                            <ColumnDefinition Width="84"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="60"></RowDefinition>
                        </Grid.RowDefinitions>
                        <TextBlock Grid.Column="0" HorizontalAlignment="Center" VerticalAlignment="Center" Text="šifra" ></TextBlock>
                        <TextBlock Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center" Text="zemlja"></TextBlock>
                        <TextBlock Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center" Text="valuta"></TextBlock>
                        <TextBlock Grid.Column="3" HorizontalAlignment="Center" VerticalAlignment="Center" Text=""></TextBlock>
                        <TextBlock Grid.Column="4" HorizontalAlignment="Center" VerticalAlignment="Center" Text="kupovni"></TextBlock>
                        <TextBlock Grid.Column="5" HorizontalAlignment="Center" VerticalAlignment="Center" Text="prodajni"></TextBlock>
                    </Grid>
                    <phone:LongListSelector Grid.Row="1" Margin="0,0,-12,0" ItemsSource="{Binding ZaDevizeItems}">
                        <phone:LongListSelector.ItemTemplate>
                            <DataTemplate>
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="51"></ColumnDefinition>
                                        <ColumnDefinition Width="165"></ColumnDefinition>
                                        <ColumnDefinition Width="39"></ColumnDefinition>
                                        <ColumnDefinition Width="33"></ColumnDefinition>
                                        <ColumnDefinition Width="84"></ColumnDefinition>
                                        <ColumnDefinition Width="84"></ColumnDefinition>
                                    </Grid.ColumnDefinitions>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="60"></RowDefinition>
                                    </Grid.RowDefinitions>
                                    <TextBlock Grid.Column="0" HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding SifraValute}" Foreground="{StaticResource PhoneSubtleBrush}"></TextBlock>
                                    <TextBlock Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Center" Text="{Binding NazivZemlje}" Foreground="{StaticResource PhoneSubtleBrush}"></TextBlock>
                                    <TextBlock Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding OznakaValute}" Foreground="{StaticResource PhoneSubtleBrush}"></TextBlock>
                                    <TextBlock Grid.Column="3" HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding VaziZa}" Foreground="{StaticResource PhoneSubtleBrush}"></TextBlock>
                                    <TextBlock Grid.Column="4" HorizontalAlignment="Right" VerticalAlignment="Center" Text="{Binding KupovniKurs, StringFormat=0.0000}" Foreground="{StaticResource PhoneSubtleBrush}"></TextBlock>
                                    <TextBlock Grid.Column="5" HorizontalAlignment="Right" VerticalAlignment="Center" Text="{Binding ProdajniKurs, StringFormat=0.0000}" Foreground="{StaticResource PhoneSubtleBrush}"></TextBlock>
                                </Grid>
                            </DataTemplate>
                        </phone:LongListSelector.ItemTemplate>
                    </phone:LongListSelector>
                </Grid>
            </phone:PivotItem>

            <!--Pivot item za efektivu-->
            <phone:PivotItem Header="{Binding Path=LocalizedResources.ZaEfektivuPivotItemText, Source={StaticResource LocalizedStrings}}">
                <Grid Grid.Row="1" Margin="0,0,-12,0">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="60"></RowDefinition>
                        <RowDefinition Height="*"></RowDefinition>
                    </Grid.RowDefinitions>
                    <Grid Grid.Row="0">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="51"></ColumnDefinition>
                            <ColumnDefinition Width="150"></ColumnDefinition>
                            <ColumnDefinition Width="90"></ColumnDefinition>
                            <ColumnDefinition Width="0"></ColumnDefinition>
                            <ColumnDefinition Width="84"></ColumnDefinition>
                            <ColumnDefinition Width="84"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="60"></RowDefinition>
                        </Grid.RowDefinitions>
                        <TextBlock Grid.Column="0" HorizontalAlignment="Center" VerticalAlignment="Center" Text="šifra" ></TextBlock>
                        <TextBlock Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center" Text="zemlja"></TextBlock>
                        <TextBlock Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center" Text="valuta"></TextBlock>
                        <TextBlock Grid.Column="3" HorizontalAlignment="Center" VerticalAlignment="Center" Text=""></TextBlock>
                        <TextBlock Grid.Column="4" HorizontalAlignment="Center" VerticalAlignment="Center" Text="kupovni"></TextBlock>
                        <TextBlock Grid.Column="5" HorizontalAlignment="Center" VerticalAlignment="Center" Text="prodajni"></TextBlock>
                    </Grid>
                    <phone:LongListSelector Grid.Row="1" Margin="0,0,-12,0" ItemsSource="{Binding ZaEfektivniStraniNovacItems}">
                        <phone:LongListSelector.ItemTemplate>
                            <DataTemplate>
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="51"></ColumnDefinition>
                                        <ColumnDefinition Width="165"></ColumnDefinition>
                                        <ColumnDefinition Width="39"></ColumnDefinition>
                                        <ColumnDefinition Width="33"></ColumnDefinition>
                                        <ColumnDefinition Width="84"></ColumnDefinition>
                                        <ColumnDefinition Width="84"></ColumnDefinition>
                                    </Grid.ColumnDefinitions>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="60"></RowDefinition>
                                    </Grid.RowDefinitions>
                                    <TextBlock Grid.Column="0" HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding SifraValute}" Foreground="{StaticResource PhoneSubtleBrush}"></TextBlock>
                                    <TextBlock Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Center" Text="{Binding NazivZemlje}" Foreground="{StaticResource PhoneSubtleBrush}"></TextBlock>
                                    <TextBlock Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding OznakaValute}" Foreground="{StaticResource PhoneSubtleBrush}"></TextBlock>
                                    <TextBlock Grid.Column="3" HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding VaziZa}" Foreground="{StaticResource PhoneSubtleBrush}"></TextBlock>
                                    <TextBlock Grid.Column="4" HorizontalAlignment="Right" VerticalAlignment="Center" Text="{Binding KupovniKurs, StringFormat=0.0000}" Foreground="{StaticResource PhoneSubtleBrush}"></TextBlock>
                                    <TextBlock Grid.Column="5" HorizontalAlignment="Right" VerticalAlignment="Center" Text="{Binding ProdajniKurs, StringFormat=0.0000}" Foreground="{StaticResource PhoneSubtleBrush}"></TextBlock>
                                </Grid>
                            </DataTemplate>
                        </phone:LongListSelector.ItemTemplate>
                    </phone:LongListSelector>
                </Grid>
            </phone:PivotItem>

            <!--Pivot item srednji kurs-->
            <phone:PivotItem Header="{Binding Path=LocalizedResources.SrednjiKursPivotItemText, Source={StaticResource LocalizedStrings}}">
                <Grid Grid.Row="1" Margin="0,0,-12,0">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="60"></RowDefinition>
                        <RowDefinition Height="*"></RowDefinition>
                    </Grid.RowDefinitions>
                    <Grid Grid.Row="0">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="51"></ColumnDefinition>
                            <ColumnDefinition Width="190"></ColumnDefinition>
                            <ColumnDefinition Width="93"></ColumnDefinition>
                            <ColumnDefinition Width="0"></ColumnDefinition>
                            <ColumnDefinition Width="84"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="60"></RowDefinition>
                        </Grid.RowDefinitions>
                        <TextBlock Grid.Column="0" HorizontalAlignment="Center" VerticalAlignment="Center" Text="šifra" ></TextBlock>
                        <TextBlock Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center" Text="zemlja"></TextBlock>
                        <TextBlock Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center" Text="valuta"></TextBlock>
                        <TextBlock Grid.Column="3" HorizontalAlignment="Center" VerticalAlignment="Center" Text=""></TextBlock>
                        <TextBlock Grid.Column="4" HorizontalAlignment="Center" VerticalAlignment="Center" Text="srednji"></TextBlock>
                    </Grid>
                    <phone:LongListSelector Grid.Row="1" Margin="0,0,-12,0" ItemsSource="{Binding SrednjiKursItems}">
                        <phone:LongListSelector.ItemTemplate>
                            <DataTemplate>
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="51"></ColumnDefinition>
                                        <ColumnDefinition Width="195"></ColumnDefinition>
                                        <ColumnDefinition Width="42"></ColumnDefinition>
                                        <ColumnDefinition Width="33"></ColumnDefinition>
                                        <ColumnDefinition Width="84"></ColumnDefinition>
                                    </Grid.ColumnDefinitions>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="60"></RowDefinition>
                                    </Grid.RowDefinitions>
                                    <TextBlock Grid.Column="0" HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding SifraValute}" Foreground="{StaticResource PhoneSubtleBrush}"></TextBlock>
                                    <TextBlock Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Center" Text="{Binding NazivZemlje}" Foreground="{StaticResource PhoneSubtleBrush}"></TextBlock>
                                    <TextBlock Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding OznakaValute}" Foreground="{StaticResource PhoneSubtleBrush}"></TextBlock>
                                    <TextBlock Grid.Column="3" HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding VaziZa}" Foreground="{StaticResource PhoneSubtleBrush}"></TextBlock>
                                    <TextBlock Grid.Column="4" HorizontalAlignment="Right" VerticalAlignment="Center" Text="{Binding SrednjiKurs, StringFormat=0.0000}" Foreground="{StaticResource PhoneSubtleBrush}"></TextBlock>
                                </Grid>
                            </DataTemplate>
                        </phone:LongListSelector.ItemTemplate>
                    </phone:LongListSelector>
                </Grid>
            </phone:PivotItem>

        </phone:Pivot>

        <TextBlock Text="{Binding Path=Datum}" HorizontalAlignment="Right" Margin="0,18,12,0"/>

        <!--Uncomment to see an alignment grid to help ensure your controls are
            aligned on common boundaries.  The image has a top margin of -32px to
            account for the System Tray. Set this to 0 (or remove the margin altogether)
            if the System Tray is hidden.

            Before shipping remove this XAML and the image itself.-->
        <!--<Image Source="/Assets/AlignmentGrid.png" VerticalAlignment="Top" Height="800" Width="480" Margin="0,-32,0,0" Grid.Row="0" IsHitTestVisible="False" />-->
    </Grid>

    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True" Mode="Default" Opacity="1.0" >

            <!--<shell:ApplicationBarIconButton IconUri="/Assets/AppBar/refresh.png" Text="osveži" Click="RefreshButtonClick"  />-->
            <shell:ApplicationBarIconButton IconUri="/Assets/AppBar/exchange.png" Text="konvertuj" Click="ButtonExchangeClick"  />

            <!--<shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem Text="get default size value" Click="MenuItem1_Click" />
                <shell:ApplicationBarMenuItem Text="get mini size value" Click="MenuItem2_Click" />
            </shell:ApplicationBar.MenuItems>-->

        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>

</phone:PhoneApplicationPage>